<template>
  <div class="fly-panel fly-link">
        <h3 class="fly-panel-title">友情链接</h3>
        <dl class="fly-panel-main">
          <dd v-for="(item,index) in lists" :key="'links'+index"><a :href="item.link" target="_blank">{{item.title}}</a></dd>
          <!-- <dd><a href="http://layim.layui.com/" target="_blank">WebIM</a></dd>
          <dd><a href="http://layer.layui.com/" target="_blank">layer</a></dd>
          <dd><a href="/laydate/" target="_blank">layDate</a></dd>
          <dd><a href="mailto:xianxin@layui-inc.com?subject=%E7%94%B3%E8%AF%B7Fly%E7%A4%BE%E5%8C%BA%E5%8F%8B%E9%93%BE" class="fly-link">申请友链</a></dd> -->
        </dl>
    </div>
</template>

<script>
import { getLinks } from '@/api/content.js'
export default {
  name: 'links',
  data () {
    return {
      lists: []
    }
  },
  mounted () {
    this.getList()
  },
  methods: {
    async getList () {
      const res = await getLinks()
      if (res.code === 200) {
        this.lists = res.data
      }
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
